package crm.system.entity;

import java.math.BigDecimal;

/**
 * SysRoleRightId entity. @author MyEclipse Persistence Tools
 */

public class SysRoleRightId implements java.io.Serializable {

	// Fields

	private BigDecimal rfId;
	private SysRole sysRole;
	private SysRight sysRight;

	// Constructors

	/** default constructor */
	public SysRoleRightId() {
	}

	/** minimal constructor */
	public SysRoleRightId(SysRole sysRole, SysRight sysRight) {
		this.sysRole = sysRole;
		this.sysRight = sysRight;
	}

	/** full constructor */
	public SysRoleRightId(BigDecimal rfId, SysRole sysRole, SysRight sysRight) {
		this.rfId = rfId;
		this.sysRole = sysRole;
		this.sysRight = sysRight;
	}

	// Property accessors

	public BigDecimal getRfId() {
		return this.rfId;
	}

	public void setRfId(BigDecimal rfId) {
		this.rfId = rfId;
	}

	public SysRole getSysRole() {
		return this.sysRole;
	}

	public void setSysRole(SysRole sysRole) {
		this.sysRole = sysRole;
	}

	public SysRight getSysRight() {
		return this.sysRight;
	}

	public void setSysRight(SysRight sysRight) {
		this.sysRight = sysRight;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof SysRoleRightId))
			return false;
		SysRoleRightId castOther = (SysRoleRightId) other;

		return ((this.getRfId() == castOther.getRfId()) || (this.getRfId() != null
				&& castOther.getRfId() != null && this.getRfId().equals(
				castOther.getRfId())))
				&& ((this.getSysRole() == castOther.getSysRole()) || (this
						.getSysRole() != null && castOther.getSysRole() != null && this
						.getSysRole().equals(castOther.getSysRole())))
				&& ((this.getSysRight() == castOther.getSysRight()) || (this
						.getSysRight() != null
						&& castOther.getSysRight() != null && this
						.getSysRight().equals(castOther.getSysRight())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getRfId() == null ? 0 : this.getRfId().hashCode());
		result = 37 * result
				+ (getSysRole() == null ? 0 : this.getSysRole().hashCode());
		result = 37 * result
				+ (getSysRight() == null ? 0 : this.getSysRight().hashCode());
		return result;
	}

}